<template>
  <div class="container">
    <uv-parse :content="content"></uv-parse>
  </div>
</template>

<script setup lang="ts">
const { proxy } = getCurrentInstance();
let code;
let content = ref("");
onLoad((e) => {
  code = e.code;
  getInfo();
});

let getInfo = async () => {
  let name = "";
  switch (code) {
    case "user_agreement":
      name = "用户协议";
      break;
    case "privacy_agreement":
      name = "隐私协议";
      break;
    case "information_security":
      name = "信息安全";
      break;
    default:
      break;
  }
  uni.setNavigationBarTitle({
    title: name,
  });
  let data = await proxy.$apis.getOpenScreenMsg({
    configKey: code,
  });
  if (data.length) {
    content.value = data[0].configValue;
  }
};
</script>



<style lang="scss" scoped>
.container {
  padding: 15px;
}
</style>
